package com.fast.alden.data.model;

import jakarta.persistence.Entity;
import jakarta.persistence.EnumType;
import jakarta.persistence.Enumerated;
import lombok.Getter;
import lombok.Setter;

import java.time.LocalDateTime;

/**
 * 登录日志
 */
@Getter
@Setter
@Entity
public class SysLoginLog extends BaseEntity {
    /**
     * 登录用户名
     */
    private String username;
    /**
     * 是否登录成功
     */
    private Boolean success;
    /**
     * IP
     */
    private String ip;
    /**
     * 错误信息
     */
    private String message;
    /**
     * 登录/注销时间
     */
    private LocalDateTime operationTime;
    /**
     * 操作类型：登录，注销，强制注销
     */
    @Enumerated(EnumType.STRING)
    private SysLoginType type;
}
